package com.luyi.sensor.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * Microprocessor单片机的实体类
 * author: luyi
 * time: 2022/1/8 21:54
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Microprocessor implements Serializable {

    @NotNull(message = "公司id为null，请传值")
    @NotEmpty(message = "公司id不能为空，请传值")
    private long company_id;

    @NotNull(message = "组id为null，请传值")
    @NotEmpty(message = "组id不能为空，请传值")
    private long group_id;

//    @NotNull(message = "单片机id为null，请传值")
//    @NotEmpty(message = "单片机id不能为空，请传值")
    @Null
    private long microprocessor_id;//当根据ID查询，则不为零

    @NotNull(message = "单片机名为null，请传值")
    @NotEmpty(message = "单片机名不能为空，请传值")
    private String microprocessor_name;
}
